import request from '/@/utils/request';

export function useProductApi() {
    return {
        queryProductList: (data: object) => {
            return request({
                url: '/api/product/queryProductList',
                method: 'post',
                data,
            });
        },

        queryAllProductList: () => {
            return request({
                url: '/api/product/queryAllProductList',
                method: 'post',
            });
        },

        queryProductDetail: (data: object) => {
            return request({
                url: '/api/product/queryProductDetail',
                method: 'post',
                data,
            });
        },

        editProduct: (data: object) => {
            return request({
                url: '/api/product/editProduct',
                method: 'post',
                data,
            });
        },

        deleteProduct: (data: object) => {
            return request({
                url: '/api/product/deleteProduct',
                method: 'post',
                data,
            });
        },

        queryProductInstanceList: (data: object) => {
            return request({
                url: '/api/product/instance/queryList',
                method: 'post',
                data,
            });
        },

        saveProductInstanceList: (data: object) => {
            return request({
                url: '/api/product/instance/saveList',
                method: 'post',
                data,
            });
        },

        deleteProductInstance: (data: object) => {
            return request({
                url: '/api/product/instance/delete',
                method: 'post',
                data,
            });
        },

    };
}